import markdown
from mdx_math import MathExtension
        


# 所支持的复杂元素
exts = ['markdown.extensions.extra', 'markdown.extensions.codehilite', 'markdown.extensions.tables',
        'markdown.extensions.toc', MathExtension(enable_dollar_delimiter=True)]

        
def convert_markdown(text):
    md = markdown.Markdown(extensions=exts)
    text = md.convert(text)
    return text
